package com.xckx.VisioViewer;

import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.awt.event.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2005</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class AboutDialog extends JDialog {
  JPanel aboutPanel = new JPanel();
  XYLayout xYLayout1 = new XYLayout();
  JLabel aboutLabel1 = new JLabel();
  JLabel aboutLabel2 = new JLabel();
  JLabel aboutLabel3 = new JLabel();
  JLabel aboutLabel4 = new JLabel();
  JLabel aboutLabel5 = new JLabel();
  JLabel aboutLabel6 = new JLabel();
  JLabel aboutLabel7 = new JLabel();
  JButton aboutBtn = new JButton();
  JLabel jLabel1 = new JLabel();
  MainFrame m_frame;

  public AboutDialog(MainFrame frame, String title, boolean modal) {
    super(frame, title, modal);
    m_frame = frame;
    try {
      jbInit();
      pack();
    }
    catch(Exception ex) {
      ex.printStackTrace();
    }
  }

  public AboutDialog() {
    this(null, "", false);
  }

  private void jbInit() throws Exception {
    aboutPanel.setBorder(BorderFactory.createRaisedBevelBorder());
    aboutPanel.setMaximumSize(new Dimension(350, 191));
    aboutPanel.setMinimumSize(new Dimension(350, 191));
    aboutPanel.setLayout(xYLayout1);
    this.setContentPane(aboutPanel);
    this.setResizable(false);
    this.setTitle(m_frame.getBundledResource().getString("AboutDialog_Title"));
    aboutPanel.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutPanel.setAlignmentY((float) 0.5);
    aboutLabel6.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutLabel6.setRequestFocusEnabled(true);
    aboutLabel6.setText(m_frame.getBundledResource().getString("AboutDialog_Content6"));
    aboutLabel7.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutLabel7.setRequestFocusEnabled(true);
    aboutLabel7.setText(m_frame.getBundledResource().getString("AboutDialog_Content7"));
    aboutLabel1.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutLabel1.setPreferredSize(new Dimension(268, 20));
    aboutLabel1.setText(m_frame.getBundledResource().getString("AboutDialog_Content1"));
    aboutLabel2.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutLabel2.setRequestFocusEnabled(true);
    aboutLabel2.setText(m_frame.getBundledResource().getString("AboutDialog_Content2"));
    aboutBtn.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutBtn.setAlignmentX((float) 0.0);
    aboutBtn.setActionCommand(m_frame.getBundledResource().getString("OK"));
    aboutBtn.setText(m_frame.getBundledResource().getString("OK"));
    aboutBtn.addMouseListener(new aboutDialog_aboutBtn_mouseAdapter(this));
    aboutLabel3.setText(m_frame.getBundledResource().getString("AboutDialog_Content3"));
    aboutLabel3.setRequestFocusEnabled(true);
    aboutLabel3.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutLabel4.setText(m_frame.getBundledResource().getString("AboutDialog_Content4"));
    aboutLabel4.setRequestFocusEnabled(true);
    aboutLabel4.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutLabel5.setText(m_frame.getBundledResource().getString("AboutDialog_Content5"));
    aboutLabel5.setRequestFocusEnabled(true);
    aboutLabel5.setFont(new java.awt.Font("Dialog", 0, 14));
    aboutPanel.add(aboutLabel1,  new XYConstraints(63, 14, 322, 34));
    aboutPanel.add(aboutLabel2, new XYConstraints(44, 39, 270, 30));
    aboutPanel.add(aboutLabel3,  new XYConstraints(63, 69, 322, -1));
    aboutPanel.add(aboutLabel4, new XYConstraints(44, 93, 322, -1));
    aboutPanel.add(aboutLabel5,  new XYConstraints(75, 118, 270, -1));
    aboutPanel.add(aboutLabel6, new XYConstraints(75, 142, 300, -1));
    aboutPanel.add(aboutLabel7, new XYConstraints(75, 166, 300, -1));
    aboutPanel.add(aboutBtn,   new XYConstraints(167, 207, -1, -1));
    aboutPanel.add(jLabel1,   new XYConstraints(101, 244, 286, 22));
    this.setSize(390,240);
  }

  void aboutBtn_mouseClicked(MouseEvent e) {
    this.dispose();
  }
}

class aboutDialog_aboutBtn_mouseAdapter extends java.awt.event.MouseAdapter {
  AboutDialog adaptee;

  aboutDialog_aboutBtn_mouseAdapter(AboutDialog adaptee) {
    this.adaptee = adaptee;
  }
  public void mouseClicked(MouseEvent e) {
    adaptee.aboutBtn_mouseClicked(e);
  }
}